package com.start.ad.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.start.ad.entity.StartAdCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StartAdCategoryMapper extends BaseMapper<StartAdCategoryEntity> {
    @Update("update start_ad_category  set ad_category_cascade_code=REPLACE(ad_category_cascade_code,#{oldCode},#{newCode}) where ad_category_cascade_code like concat(#{oldCode},'%')")
    long updateChildCode(@Param("oldCode") String oldCode, @Param("newCode") String newCode);
}
